package io.yunho.yunho.interview.two.juc;

/**
 * Created by Administrator on 2020/4/8.
 */
public class MyDataAT {
    volatile int number = 0;
    public void addTo60(){
        this.number=60;
    }
    //volatile 不保证原子性
    //synchronized 自然可以 但是杀鸡焉用牛刀 太重了
    public void addPlusPlus(){
        number++;
    }
}
